x11 drag: Fix mapped error
authorAlexander Larsson <alexl@redhat.com>
Thu, 14 May 2020 07:42:53 +0000 (09:42 +0200)
committerAlexander Larsson <alexl@redhat.com>
Thu, 14 May 2020 07:54:34 +0000 (09:54 +0200)
commite702d425975a603f9e73f7de222406d9b5969a50
tree67be660c215a80099206f28e6890887a0e7a1f9f
parent64db8be7d51faf60c6e862936bd4fd4957737159
x11 drag: Fix mapped error

In the gtk-demo drag-and-drop demo i can't drag anything, all I get
is:

(gtk4-demo:358993): Gdk-CRITICAL **: 09:36:19.617: Surface 0x7e1bb0 has not been mapped in GdkSeatGrabPrepareFunc

This is because GdkX11Drag.ipc_surface is not considered mapped, even
though we called gdk_x11_surface_show() on it, because the
GDK_SURFACE_STATE_WITHDRAWN flag is still set.

I added calls to gdk_synthesize_surface_state() to match what
e.g. show_popup() and gdk_x11_toplevel_present() does.
gdk/x11/gdkdrag-x11.c